This invention relates to programmable controllers, systems using such programmable controllers, a CPU unit for such programmable controllers and methods of starting a duplexed operation of such a programmable controller system.
Programmable controllers are being used as controlling devices for the factory automation set at a production factory (or a production site). Such a programmable controller (PLC) is comprised of a plurality of units, that is, it is formed by appropriately combining units of various types such as a power unit serving as a supply source of electric power, a CPU unit for carrying out the control of the PLC as a whole, an input unit for inputting signals from switches and sensors set at appropriate positions of a production device or an equipment of the factory automation, an output unit for transmitting control outputs to actuators and a communication unit for connecting to a communication network.
The control by the CPU unit of a PLC is carried out by taking in signals inputted by the input unit into the I/O memory of the CPU unit (IN refresh), performing logical calculations based on a user program in a preliminarily registered user program language such as a ladder language (calculation), writing the results of the performed calculations in the I/O memory to thereby transmit them to the output unit (OUT refresh) and to thereafter cyclically repeat peripheral processes such as exchanging data with other PLCs on the communication network through the communication unit or with external apparatus through communication ports on the CPU unit. The IN refresh and the OUT refresh may be sometimes carried out summarily (I/O refresh).
In order to improve system safety and reliability, individual units comprising a PLC are sometimes doubled up, or duplexed. For duplexing a CPU unit (which is one of the objects of this invention), for example, two CPU units having the same functions and being adapted to execute the same user program are provided and connected by a bus.
One of these two CPU units serves as the CPU unit of an executing system (or executing CPU unit) to actually carry out processes cyclically, reading from and writing into a memory, exchanging control data (I/O data) with external I/O devices and controlling a factory automation network system. The other CPU unit becomes the CPU unit of a standby system (or standby CPU unit). Although the CPU unit of a standby system during a standby period carries out the same user program as that of the CPU unit of the executing system, it is not adapted to output the results of its calculations. Instead, it serves to receive results of calculations, etc. from the CPU unit of the executing system and to update the memory content of the CPU unit of the standby system. Thus, the memory contents of the CPU units of the executing system and the standby system can be maintained in the same condition.
When an abnormal condition occurs in the CPU unit of the executing system, the CPU unit of the standby system takes the place of the CPU unit of the executing system to carry out the operations such as the actual control. Thus, the occurrence of an abnormal condition in the CPU unit of the executing system does not cause the system to immediately come to a stop. The system reliability can thus be improved since the system can be operated continuously even in such a situation.
The user program executed by the CPU unit is downloaded by means of a support tool connected to the PLC and stored in the user memory of the PLC (the CPU unit). When the user program stored in the PLC is to be amended, a support tool is connected to the PLC to upload it and after the amendment is effected, the amended new user program is donwloaded again to the PLC. The support tool may be a personal computer or a dedicated peripheral device.
When the CPU unit is duplexed and there are two CPU units, the same user program must be implemented to each of these CPU units. This may be done by downloading the user program to each of the CPU units but this is a troublesome way of implementation because the user will be required to carry out the same downloading process twice. Thus, it has been known to use a support tool to download the user program only to the CPU unit of the executing system and to have it copied to the CPU unit of the standby system by using its copying function.
As production methods become improved and complicated and technologies progress, however, upgraded PLCs with new functions added, as well as new software with improved functions, are introduced. Although the processing speed may be increased and new functions may be added, PLCs of a new version are basically designed to maintain exchangeability with PLCs of prior versions and the functions of PLCs of older versions are directly inherited by those of a new version. Thus, user programs which used to be used by PLCs of an old version can be directly implemented to a PLC of a new version.
When a new version is introduced in connection with an improved function, for example, it often happens that the form remains the same but only the version is updated. Thus, since there may be two CPU units of the same form although their versions are different, the versions of two CPUs implemented for duplexing may be different.
Support tools each correspond individually to a PLC (CPU unit). If a new version of PLC is introduced, the version of the support tool is accordingly updated. In other words, if the new version of PLC has expanded functions, a support tool of the old version cannot correspond to the expanded functions and a new tool becomes necessary in order to support such newly introduced functions. Since the support tool of the new version is designed so as to inherit the functions of the older support tools, the support tools of the new version can be connected to a PLC of the older version to download, create and amend user programs.
Thus, the support tool of a new version is connectable to a PLC of either a new version or an old version, while the support tool of the old version is connectable only to a PLC of the older vision. When PLCs of a new version are introduced, therefore, the new version is arranged such that a support tool of an old version will not be connected to a PLC of the new version to attempt certain support processes such as addition or updating of a user program. This may be done, for example, such that, when a support tool is connected to a PLC, the support tool reads out data on the machine type of the PLC (such as its form and version) through a communication between them, compares them with the data on PLC types that can be served by it and thereby judges whether a connection may be made. This may be done by connecting the PLC and the support tool by means of a communication line such as a serial communication line, issuing a command from the support tool to the PLC to request data on the PLC type and causing the PLC to respond with its own PLC type data. Since the support tool stores a list of PLC types to which it may be connected, it undertakes to compare this list with the PLC type data received as a response from the PLC. Such technology has been disclosed, for example, in Japanese Patent Publication Tokkai 10-97310.
If a support tool as disclosed in aforementioned Japanese Patent Publication Tokkai 10-97310 is employed to download a user program to the CPU unit of the executing system, a user program of the correct version executable by this CPU can be download because the support tool checks the type of this CPU unit. When the user program is copied from the CPU unit of the executing system to the CPU unit of the standby system, however, the support tool cannot check the version of the CPU unit. In a situation where the CPU unit of the executing system is of the new version and the CPU unit of the standby system is of an old version, for example, the user program may be copied but as the copied user program is executed by the CPU unit of the standby system, it may stop the operation or carry out an abnormal operation if a circuit is encountered that cannot be handled by it. As a result, if the CPU unit is switched over to the side of the executing system, the operation of the PLC will be stopped.
The problem described above can be obviated if the form is changed whenever a new version is introduced such that CPUs of the same form will be used, but the number of forms will increase by this method and this will complicate the management of forms by the makers and users and hence is not a practical solution.